package com.everyday;

import java.util.HashMap;
import java.util.HashSet;
import java.util.Hashtable;
import java.util.TreeMap;
import java.util.concurrent.locks.ReentrantLock;

public class Solution {
    public static void main(String[] args) {
        HashMap<Object, Object> objectObjectHashMap = new HashMap<>();
        TreeMap<Object, Object> objectObjectTreeMap = new TreeMap<>();
        Hashtable<Object, Object> objectObjectHashtable = new Hashtable<>();
        HashSet<Object> objects = new HashSet<>();
        //new ReentrantLock()
        int[][] arr = new int[][]{{1},{1,2,3},{1,2}};
        for (int i = 0; i < arr.length; i++) {
            System.out.println(arr[i].length);
        }
    }

    public void quickSort(int[] arr, int l, int r) {
        if (l >= r) return;
        int i = l, j = r;
        while (i < j) {
            while (i < j && arr[i] <= arr[l]) i++;
            while (i < j && arr[j] >= arr[l]) j--;
            swap(arr, i, j);
        }
        swap(arr, l, i);
        quickSort(arr, l, i - 1);
        quickSort(arr, i + 1, r);
    }

    public void swap(int[] arr, int i, int j) {
        int tmp = arr[i];
        arr[i] = arr[j];
        arr[j] = tmp;
    }
}
